<?php
namespace app\index\controller;

use think\Db;

class Lst extends Base{
    public function index(){
        $catename = Db::name('cate') -> field('catename') -> find(input('cate_id'))['catename'];
        $arters = Db::name('article') -> order('id DESC') -> where(['cate_id' => input('cate_id')]) -> paginate(2);

        $this -> assign('arters', $arters);
        $this -> assign('catename', $catename);
        return $this -> fetch('lst');
    }
}